3.77 \(\int \frac{\tan ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx\)

Optimal. Leaf size=128 \[ -\frac{3 i}{16 a^4 d (1+i \tan (c+d x))}+\frac{i}{16 d \left (a^2+i a^2 \tan (c+d x)\right )^2}+\frac{x}{16 a^4}+\frac{i \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}+\frac{\tan ^3(c+d x)}{12 a d (a+i a \tan (c+d x))^3} \]

[Out]

x/(16*a^4) - ((3*I)/16)/(a^4*d*(1 + I*Tan[c + d*x])) + ((I/8)*Tan[c + d*x]^4)/(d*(a + I*a*Tan[c + d*x])^4) + T
an[c + d*x]^3/(12*a*d*(a + I*a*Tan[c + d*x])^3) + (I/16)/(d*(a^2 + I*a^2*Tan[c + d*x])^2)

________________________________________________________________________________________

Rubi [A]  time = 0.178446, antiderivative size = 128, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {3546, 3540, 3526, 8} \[ -\frac{3 i}{16 a^4 d (1+i \tan (c+d x))}+\frac{i}{16 d \left (a^2+i a^2 \tan (c+d x)\right )^2}+\frac{x}{16 a^4}+\frac{i \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}+\frac{\tan ^3(c+d x)}{12 a d (a+i a \tan (c+d x))^3} \]

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x]^4/(a + I*a*Tan[c + d*x])^4,x]

[Out]

x/(16*a^4) - ((3*I)/16)/(a^4*d*(1 + I*Tan[c + d*x])) + ((I/8)*Tan[c + d*x]^4)/(d*(a + I*a*Tan[c + d*x])^4) + T
an[c + d*x]^3/(12*a*d*(a + I*a*Tan[c + d*x])^3) + (I/16)/(d*(a^2 + I*a^2*Tan[c + d*x])^2)

Rule 3546

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim
p[(a*(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n)/(2*b*f*m), x] - Dist[(a*c - b*d)/(2*b^2), Int[(a + b*Tan[e
 + f*x])^(m + 1)*(c + d*Tan[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] &&
EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && EqQ[m + n, 0] && LeQ[m, -2^(-1)]

Rule 3540

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> -Simp[
(b*(a*c + b*d)^2*(a + b*Tan[e + f*x])^m)/(2*a^3*f*m), x] + Dist[1/(2*a^2), Int[(a + b*Tan[e + f*x])^(m + 1)*Si
mp[a*c^2 - 2*b*c*d + a*d^2 - 2*b*d^2*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0] && LeQ[m, -1] && EqQ[a^2 + b^2, 0]

Rule 3526

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[((
b*c - a*d)*(a + b*Tan[e + f*x])^m)/(2*a*f*m), x] + Dist[(b*c + a*d)/(2*a*b), Int[(a + b*Tan[e + f*x])^(m + 1),
 x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{\tan ^4(c+d x)}{(a+i a \tan (c+d x))^4} \, dx &=\frac{i \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}-\frac{i \int \frac{\tan ^3(c+d x)}{(a+i a \tan (c+d x))^3} \, dx}{2 a}\\ &=\frac{i \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}+\frac{\tan ^3(c+d x)}{12 a d (a+i a \tan (c+d x))^3}-\frac{\int \frac{\tan ^2(c+d x)}{(a+i a \tan (c+d x))^2} \, dx}{4 a^2}\\ &=\frac{i \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}+\frac{\tan ^3(c+d x)}{12 a d (a+i a \tan (c+d x))^3}+\frac{i}{16 d \left (a^2+i a^2 \tan (c+d x)\right )^2}-\frac{\int \frac{a-2 i a \tan (c+d x)}{a+i a \tan (c+d x)} \, dx}{8 a^4}\\ &=-\frac{3 i}{16 a^4 d (1+i \tan (c+d x))}+\frac{i \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}+\frac{\tan ^3(c+d x)}{12 a d (a+i a \tan (c+d x))^3}+\frac{i}{16 d \left (a^2+i a^2 \tan (c+d x)\right )^2}+\frac{\int 1 \, dx}{16 a^4}\\ &=\frac{x}{16 a^4}-\frac{3 i}{16 a^4 d (1+i \tan (c+d x))}+\frac{i \tan ^4(c+d x)}{8 d (a+i a \tan (c+d x))^4}+\frac{\tan ^3(c+d x)}{12 a d (a+i a \tan (c+d x))^3}+\frac{i}{16 d \left (a^2+i a^2 \tan (c+d x)\right )^2}\\ \end{align*}

Mathematica [A]  time = 0.211376, size = 98, normalized size = 0.77 \[ \frac{\sec ^4(c+d x) (32 \sin (2 (c+d x))+24 i d x \sin (4 (c+d x))+3 \sin (4 (c+d x))-64 i \cos (2 (c+d x))+3 (8 d x+i) \cos (4 (c+d x))+36 i)}{384 a^4 d (\tan (c+d x)-i)^4} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[c + d*x]^4/(a + I*a*Tan[c + d*x])^4,x]

[Out]

(Sec[c + d*x]^4*(36*I - (64*I)*Cos[2*(c + d*x)] + 3*(I + 8*d*x)*Cos[4*(c + d*x)] + 32*Sin[2*(c + d*x)] + 3*Sin
[4*(c + d*x)] + (24*I)*d*x*Sin[4*(c + d*x)]))/(384*a^4*d*(-I + Tan[c + d*x])^4)

________________________________________________________________________________________

Maple [A]  time = 0.026, size = 118, normalized size = 0.9 \begin{align*}{\frac{{\frac{i}{8}}}{d{a}^{4} \left ( \tan \left ( dx+c \right ) -i \right ) ^{4}}}-{\frac{{\frac{i}{32}}\ln \left ( \tan \left ( dx+c \right ) -i \right ) }{d{a}^{4}}}-{\frac{{\frac{17\,i}{16}}}{d{a}^{4} \left ( \tan \left ( dx+c \right ) -i \right ) ^{2}}}+{\frac{7}{12\,d{a}^{4} \left ( \tan \left ( dx+c \right ) -i \right ) ^{3}}}-{\frac{15}{16\,d{a}^{4} \left ( \tan \left ( dx+c \right ) -i \right ) }}+{\frac{{\frac{i}{32}}\ln \left ( \tan \left ( dx+c \right ) +i \right ) }{d{a}^{4}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)^4/(a+I*a*tan(d*x+c))^4,x)

[Out]

1/8*I/d/a^4/(tan(d*x+c)-I)^4-1/32*I/d/a^4*ln(tan(d*x+c)-I)-17/16*I/d/a^4/(tan(d*x+c)-I)^2+7/12/d/a^4/(tan(d*x+
c)-I)^3-15/16/d/a^4/(tan(d*x+c)-I)+1/32*I/d/a^4*ln(tan(d*x+c)+I)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^4/(a+I*a*tan(d*x+c))^4,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [A]  time = 2.59287, size = 205, normalized size = 1.6 \begin{align*} \frac{{\left (24 \, d x e^{\left (8 i \, d x + 8 i \, c\right )} - 48 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 36 i \, e^{\left (4 i \, d x + 4 i \, c\right )} - 16 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 3 i\right )} e^{\left (-8 i \, d x - 8 i \, c\right )}}{384 \, a^{4} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^4/(a+I*a*tan(d*x+c))^4,x, algorithm="fricas")

[Out]

1/384*(24*d*x*e^(8*I*d*x + 8*I*c) - 48*I*e^(6*I*d*x + 6*I*c) + 36*I*e^(4*I*d*x + 4*I*c) - 16*I*e^(2*I*d*x + 2*
I*c) + 3*I)*e^(-8*I*d*x - 8*I*c)/(a^4*d)

________________________________________________________________________________________

Sympy [A]  time = 2.33076, size = 190, normalized size = 1.48 \begin{align*} \begin{cases} \frac{\left (- 98304 i a^{12} d^{3} e^{18 i c} e^{- 2 i d x} + 73728 i a^{12} d^{3} e^{16 i c} e^{- 4 i d x} - 32768 i a^{12} d^{3} e^{14 i c} e^{- 6 i d x} + 6144 i a^{12} d^{3} e^{12 i c} e^{- 8 i d x}\right ) e^{- 20 i c}}{786432 a^{16} d^{4}} & \text{for}\: 786432 a^{16} d^{4} e^{20 i c} \neq 0 \\x \left (\frac{\left (e^{8 i c} - 4 e^{6 i c} + 6 e^{4 i c} - 4 e^{2 i c} + 1\right ) e^{- 8 i c}}{16 a^{4}} - \frac{1}{16 a^{4}}\right ) & \text{otherwise} \end{cases} + \frac{x}{16 a^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)**4/(a+I*a*tan(d*x+c))**4,x)

[Out]

Piecewise(((-98304*I*a**12*d**3*exp(18*I*c)*exp(-2*I*d*x) + 73728*I*a**12*d**3*exp(16*I*c)*exp(-4*I*d*x) - 327
68*I*a**12*d**3*exp(14*I*c)*exp(-6*I*d*x) + 6144*I*a**12*d**3*exp(12*I*c)*exp(-8*I*d*x))*exp(-20*I*c)/(786432*
a**16*d**4), Ne(786432*a**16*d**4*exp(20*I*c), 0)), (x*((exp(8*I*c) - 4*exp(6*I*c) + 6*exp(4*I*c) - 4*exp(2*I*
c) + 1)*exp(-8*I*c)/(16*a**4) - 1/(16*a**4)), True)) + x/(16*a**4)

________________________________________________________________________________________

Giac [A]  time = 2.51677, size = 124, normalized size = 0.97 \begin{align*} -\frac{-\frac{12 i \, \log \left (-i \, \tan \left (d x + c\right ) + 1\right )}{a^{4}} + \frac{12 i \, \log \left (-i \, \tan \left (d x + c\right ) - 1\right )}{a^{4}} + \frac{-25 i \, \tan \left (d x + c\right )^{4} + 260 \, \tan \left (d x + c\right )^{3} - 522 i \, \tan \left (d x + c\right )^{2} - 388 \, \tan \left (d x + c\right ) + 103 i}{a^{4}{\left (\tan \left (d x + c\right ) - i\right )}^{4}}}{384 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^4/(a+I*a*tan(d*x+c))^4,x, algorithm="giac")

[Out]

-1/384*(-12*I*log(-I*tan(d*x + c) + 1)/a^4 + 12*I*log(-I*tan(d*x + c) - 1)/a^4 + (-25*I*tan(d*x + c)^4 + 260*t
an(d*x + c)^3 - 522*I*tan(d*x + c)^2 - 388*tan(d*x + c) + 103*I)/(a^4*(tan(d*x + c) - I)^4))/d